import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import './icons' // icon
import ElementUI from 'element-ui'
import './styles/element-variables.scss'
import '@/styles/index.scss' // global css
import locale from 'element-ui/lib/locale/lang/en' // lang i18n
import '@/permission' // permission control
import 'font-awesome/css/font-awesome.min.css'

Vue.config.productionTip = false;
Vue.use(ElementUI, { locale })
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount("#app");

import Router from 'vue-router'

const originalPush = Router.prototype.push

Router.prototype.push = function push(location) {
  return originalPush.call(this, location).catch(err => err)
}
